﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for TinTucKhuyenMaiEntity
/// </summary>
public class TinTucKhuyenMaiEntity
{

    private int idkm;
    private string tieuDe;
    private string gioiThieu;
    private DateTime ngayNhap;
    private string noiDung;
    private string hinhAnhDaiDien;
    private string nguon;
    public TinTucKhuyenMaiEntity()
    { }
    public TinTucKhuyenMaiEntity(int idkm, string tieuDe, string gioiThieu, DateTime ngayNhap, string noiDung, string hinhAnhDaiDien, string nguon)
    {
        this.idkm = idkm;
        this.tieuDe = tieuDe;
        this.gioiThieu = gioiThieu;
        this.ngayNhap = ngayNhap;
        this.noiDung = noiDung;
        this.hinhAnhDaiDien = hinhAnhDaiDien;
        this.nguon = nguon;
    }
    public int Idkm
    {
        get { return this.idkm; }
        set
        {
            if (value == null)
                throw new Exception("idkm not allow nullvalue.");
            this.idkm = value;
        }
    }
    public string TieuDe
    {
        get { return this.tieuDe; }
        set { this.tieuDe = value; }
    }
    public string GioiThieu
    {
        get { return this.gioiThieu; }
        set { this.gioiThieu = value; }
    }
    public DateTime NgayNhap
    {
        get { return this.ngayNhap; }
        set { this.ngayNhap = value; }
    }
    public string NoiDung
    {
        get { return this.noiDung; }
        set { this.noiDung = value; }
    }
    public string HinhAnhDaiDien
    {
        get { return this.hinhAnhDaiDien; }
        set { this.hinhAnhDaiDien = value; }
    }
    public string Nguon
    {
        get { return this.nguon; }
        set { this.nguon = value; }
    }
    public override string ToString()
    {
        return this.idkm + "; " + this.tieuDe + "; " + this.gioiThieu + "; " + this.ngayNhap + "; " + this.noiDung + "; " + this.hinhAnhDaiDien + "; " + this.nguon + "; ";
    }
    public override bool Equals(Object obj)
    {
        TinTucKhuyenMaiEntity me = (TinTucKhuyenMaiEntity)obj;
        bool ret = this.Idkm.Equals(me.Idkm);
        return ret;
    }
    public override int GetHashCode()
    {
        return this.Idkm.GetHashCode();
    }
}